package com.dragon.methodquote;

import java.util.Comparator;
import java.util.function.Function;

/**
 * @author dragon
 * @version V1.0.0-RELEASE
 * @date 2019/5/30 17:34
 */
public class PersonTest {

    public static void main(String[] args) {
        Comparator<Person> personComparator = Comparator.comparing(Person::getName);
//        Comparator<Person> comparing = Comparator.comparing(new Function<Person, String>() {
//            @Override
//            public String apply(Person person) {
//                return person.getName();
//            }
//        });
//        Comparator<Person> comparing1 = Comparator.comparing(p -> p.getName());
    }
}
